#Include "Protheus.ch"

User Function TstFwLis()
Local aArray := Array(6)
Local nIndex
Local lResult
Local oList := TEFWList():New()
Local oItem1 := TItmPedMer():ImpLinha("04000100000   EN 7896331100396 MANT AVIACAO 500G C SAL                 106000              EA 00024000000000001600000000000000000000000000000000BX 0001600000000031104000000000031104000000000001944000000000001944000000EA 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000          ")
Local oItem2 := TItmPedMer():ImpLinha("04000200000   EN 7896331100051 MANT AVIACAO 200G C SAL C SAL           103000              EA 00060000000000000700000000000000000000000000000000BX 0000700000000017850000000000017850000000000002550000000000002550000000EA 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000          ")
Local oItem3 := TItmPedMer():ImpLinha("04000300000   EN 7896331100136 MANT AVIACAO 200G TABLE S SAL           101900              EA 00024000000000002000000000000000000000000000000000BX 0002000000000016560000000000016560000000000000828000000000000828000000EA 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000          ")
Local oItem4 := TItmPedMer():ImpLinha("04000400000   EN 7896331100143 MANT AVIACAO 200G TABLE C SAL           102400              EA 00024000000000002500000000000000000000000000000000BX 0002500000000020700000000000020700000000000000828000000000000828000000EA 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000          ")
Local oItem5 := TItmPedMer():ImpLinha("04000500000   EN 7896331100310 MANT AVIACAO 200G C SAL                 105500              EA 00048000000000003000000000000000000000000000000000BX 0003000000000051120000000000051120000000000001704000000000001704000000EA 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000          ")
Local oItem6 := TItmPedMer():ImpLinha("04000600000   EN 7896331100389 MANT AVIACAO 200G S SAL                 105700              EA 00048000000000001000000000000000000000000000000000BX 0001000000000017040000000000017040000000000001704000000000001704000000EA 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000          ")
Local oIList := IEFWConnec():New()

oList:Add(oItem1)
oList:Add(oItem3)
oList:Add(oItem2)
oList:Add(oItem5)
oList:Add(oItem4)
oList:Add(oItem6)

/*oList:Remove(oItem3)
lResult := oList:Get(1):Equals(oItem1)
oList:CopyTo(@aArray, 1)
lResult := oList:Contains(oItem3)
nIndex := oList:IndexOf(oItem5)
oList:Insert(3, oItem3)*/
oList:Sort()
Alert("Fim!!")

Return Nil